﻿using System.Collections.Generic;
using System.Collections.ObjectModel;

namespace Wp7Tools.Controls {
    public class ObservableGroup<T> : ObservableCollection<T> {
        public string Label { get; set; }

        public bool HasItems {
            get {
                return Count != 0;
            }
        }

        public ObservableGroup(string label, IEnumerable<T> items) {
            Label = label;
            foreach (var item in items) {
                Add(item);
            }
        }
    }
}
